import UIKit

class BaseNavigationController: UINavigationController {
    
    override func viewDidLoad() {
        super.viewDidLoad()
        setupNavigationBar()
    }
    
    private func setupNavigationBar() {
        // 设置导航栏样式
        navigationBar.tintColor = .systemBlue
        navigationBar.barTintColor = .white
        
        // 设置导航栏标题样式
        navigationBar.titleTextAttributes = [
            .foregroundColor: UIColor.black,
            .font: UIFont.boldSystemFont(ofSize: 18)
        ]
        
        // 设置导航栏阴影
        navigationBar.shadowImage = UIImage()
        navigationBar.setBackgroundImage(UIImage(), for: .default)
    }
    
    override func pushViewController(_ viewController: UIViewController, animated: Bool) {
        // 隐藏底部TabBar（如果不是根控制器）
        if viewControllers.count > 0 {
            viewController.hidesBottomBarWhenPushed = true
        }
        super.pushViewController(viewController, animated: animated)
    }
} 